const url = require('url');
const _url = new URL('/a/b?a=10&b=20#aaa','http://www.baidu.com');
console.log(_url);